package day07;

public class txt15 {
    public static void main(String[] args) {
        int[] a = {8, 6, 4, 9, 3};
        int b=findele(a,6);
        System.out.println( b);

    }



    static int findele(int[]a,int ele){
        for(int i=0;i<a.length;i++){
            if(a[i]== ele){
                System.out.println("找到元素");
                return i;
            }
        }
        return -2;
    }
}
